/*
 * Josh Lindoo
 * Login ID : lind6441
 * CS-102, Winter 2013
 * Programming Assignment 2
 * Node class: Used to generate nodes for a linked list
 */

public class Node<T> {
	private T data; //data
	private Node<T> next; //link to next node
	private LinkedList<Showing> showingLinkedList; //head of corresponding showings list
	
	/**
	 * Default constructor
	 */
	public Node() {
		data = null;
		next = null;
	}
	
	/**
	 * Constructor
	 * @param item	data item
	 */
	public Node(T item) {
		setData(item);
		next = null;
	}
	
	/**
	 * Accessor for data
	 * @return data
	 */
	public T getData() {
		return data;
	}
	
	/**
	 * Accessor for next
	 * @return next
	 */
	public Node<T> getNext() {
		return next;
	}
	
	/**
	 * Mutator for data
	 * @param item	Item to be stored in data
	 */
	public void setData(T item) {
		this.data = item;
	}
	
	/**
	 * Mutator for next
	 * @param next	Reference to next node
	 */
	public void setNext(Node<T> next) {
		this.next = next;
	}
	
}
